package work.timejay.shop.entity.user;

import work.timejay.annotations.EncryptField;
import work.timejay.annotations.EncryptTable;
import work.timejay.common.SuperModel;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author 王文杰
 * @since 2024-01-29
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("user")
//@EncryptTable
public class User extends SuperModel<User> {

    private static final long serialVersionUID = 1L;

    /**
     * 用户姓名
     */
    @TableField("name")
    private String name;

    /**
     * 用户密码
     */
    @TableField("password")
    private String password;

    /**
     * 角色id
     */
    @TableField("role_id")
    private Long roleId;

    /**
     * 盐
     */
    @TableField("salt")
    private String salt;

    /**
     * 手机号
     */
    @TableField("phone")
    //@EncryptField
    private String phone;

    /**
     * 用户图像
     */
    @TableField("user_logo")
    private String userLogo;


    public static final String NAME = "name";

    public static final String PASSWORD = "password";

    public static final String ROLE_ID = "role_id";

    public static final String SALT = "salt";

    public static final String PHONE = "phone";

    public static final String USER_LOGO = "user_logo";

    @Override
    protected Serializable pkVal() {
        return null;
    }

}
